package com.lhl.security.utils;

import com.github.pagehelper.Page;
import lombok.Data;

import java.util.List;

@Data
public class PageUtils<T> {
    private int pageNum;
    private int pageSize;
    private long startRow;
    private long endRow;
    private long total;
    private int pages;
    private List<T> list;

    public PageUtils(Page<T> page) {
        this.pageNum = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.startRow = page.getStartRow();
        this.endRow = page.getEndRow();
        this.total = page.getTotal();
        this.pages = page.getPages();
        this.list = page;
    }
}
